<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="./../template/StakeholderTemplate.xhtml">

    <ui:define name="contentInsert">
        
        <h3>Generate summary</h3>
                <h:form>
                    <p:panel id="panel" >
                    <p:ajaxStatus style="width:16px;height:16px;">
                    <f:facet name="start">
                        <h:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" />
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value="" />
                    </f:facet>
                </p:ajaxStatus>
                <p:messages />
                    <h:panelGrid columns="3">
                        <h:outputLabel for="month" value="Choose Month"/>          
                            <h:selectOneMenu id="month" value="#{stakeholderAccountsManagerBean.month1}">  
                                <f:selectItem itemLabel="JAN" itemValue="1" />
                                <f:selectItem itemLabel="FEB" itemValue="2" />  
                                <f:selectItem itemLabel="MAR" itemValue="3" />
                                <f:selectItem itemLabel="APR" itemValue="4" />  
                                <f:selectItem itemLabel="MAY" itemValue="5" />  
                                <f:selectItem itemLabel="JUN" itemValue="6" />  
                                <f:selectItem itemLabel="JUL" itemValue="7" />  
                                <f:selectItem itemLabel="AUG" itemValue="8" />  
                                <f:selectItem itemLabel="SEP" itemValue="9" />  
                                <f:selectItem itemLabel="OCT" itemValue="10" />  
                                <f:selectItem itemLabel="NOV" itemValue="11" />  
                                <f:selectItem itemLabel="DEC" itemValue="12" />  
                            </h:selectOneMenu>
                            <p:message for="month"/>
                            <h:outputLabel for="year" value="Enter year: "/>
                            <p:inputText required="true" requiredMessage="Year is requied!"
                                         id="year" value="#{stakeholderAccountsManagerBean.year}"/>
                            <p:message for="year"/>

                                       
                    </h:panelGrid>
                    <br/>
                    <br/>
                   <h:commandButton id="generateReport" value="Generate sales summary" onclick="if (!confirm('Are you sure you want to generate report?')) return false"
                                    action="#{stakeholderAccountsManagerBean.generateSalesReport(event)}"
                                    />
                   <br/>
                   <h:commandButton id="generateReward" value="Generate reward summary" onclick="if (!confirm('Are you sure you want to generate report?')) return false"
                                    action="#{stakeholderAccountsManagerBean.generateRewardRecord(event)}"
                                    />
                                             
                                </p:panel>
                </h:form>

    </ui:define>

</ui:composition>

